To avoid assignment incompatibilities, the new attribute 'TAG can be used. It is available for signals, variables, and constants of class or class-wide type as well as for class types themselves.

The 'TAG attribute returns a value of the new enumeration type universal_TAG, which represents all defined class types.

For this enumeration type, the relations =, !=, <, <=, > and >= are defined. To get the semantics for the < and > relation, think of them as the tilt triangle for defining inheritance in UML.

Now the potential type incompatibility of the third assignment of the last example can be avoided using the 'TAG attribute:

IF pack1'TAG = pack2'TAG THEN
  pack2 := pack1;
END IF;


The complete semantics for the relations on the universal_TAG are:
A'TAG = B'TAG
TRUE, if A is of the same actual class type as B
A'TAG != B'TAG
TRUE, if A is not of the same actual class type as B
A'TAG < B'TAG
TRUE, if B is of a class type derived from the class type of A
A'TAG <= B'TAG
TRUE, if B is of a class type derived from the class type of A or the same class type
A'TAG >= B'TAG
TRUE, if A is of a class type derived from the class type of B or the same class type
A'TAG > B'TAG
TRUE, if A is of a class type derived from the class type of B